﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using UT3Bots.UTItems;

namespace UT3Bots.Visualizer.Controls
{
    public partial class UTUINavPoint : UserControl
    {
		private UTNavPoint _navPoint;
        private Tooltip _tooltip;

        public UTUINavPoint(UTNavPoint navPoint)
		{
			this._navPoint = navPoint;
			this.DataContext = this._navPoint;
			InitializeComponent();
		}

        private void UserControl_MouseEnter(object sender, MouseEventArgs e)
        {
            _tooltip = new Tooltip("Nav Point", _navPoint.Id.ToString(), _navPoint.Location, e.GetPosition(null).X + 5 , e.GetPosition(null).Y + 5, 1);
            UTUIMap.CurrentMap.AddTooltip(_tooltip);
        }

        private void UserControl_MouseLeave(object sender, MouseEventArgs e)
        {
            UTUIMap.CurrentMap.RemoveTooltop(_tooltip);
            _tooltip = null;
        }
    }
}
